package com.zut.util;
import com.alibaba.druid.filter.config.ConfigTools;

/**
 * @author： sk
 * @create: 2022/7/27
 * 数据库密码加密工具类
 */
public class DataSourcePasswordUtil {

    /**
     * 加密
     * @param cipherText
     * @return
     * @throws Exception
     */
    public static String encrypt(String cipherText) throws Exception {
        String encrypt = ConfigTools.encrypt(cipherText);
        return encrypt;
    }

    /**
     * 解密
     * @param cipherText
     * @return
     * @throws Exception
     */
    public static String decrypt(String cipherText) throws Exception {
        String decrypt = ConfigTools.decrypt(cipherText);
        return decrypt;
    }

}

